<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/templates/layout.xhtml">

	<ui:define name="corpo">
		<div style="background: red">

			<h:form id="form">
				<h:outputText id="txt_count" value="#{counterBean.count}" />



				<p:poll interval="3" actionListener="#{counterBean.increment}"
					update="txt_count">
				</p:poll>
			</h:form>


			﻿﻿
			<h:form id="formularioFooter">
				<h:panelGrid columns="3">
					<h:outputText value="#{counterBean.data}" id="data">
						<f:convertDateTime pattern="dd/MM/yyyy hh:mm:ss" />
					</h:outputText>
					
					<h:outputText value="Usuário: Benigno." />
					<p:poll interval="5" listener="#{counterBean.atualizaData}"
						update="data"/>
				</h:panelGrid>
			</h:form>
		</div>
	</ui:define>
</ui:composition>

</html>